<template>
    <van-popup v-model="showPop" position="bottom">
        <nav-bar title="银行卡信息" noLeft @click-right="showPop=false">
            <template v-slot:right>
                <van-icon name="cross" />
            </template>
        </nav-bar>

        <div class="con">
            <van-cell-group title="详细信息">
                <van-cell title="账户类型" :value="bankInfo.accountType|accountType" />
                <van-cell title="状态" :value="bankInfo.status|bankStatus" />
                <van-cell title="户名" :value="bankInfo.accountName||''" />
                <van-cell title="卡号" :value="bankInfo.accountNo||''" />
                <van-cell title="预留手机号" :value="bankInfo.bankTel||''" />
                <van-cell title="开户行名称	" :value="bankInfo.bankName||''" />
                <van-cell title="银行短号	" :value="bankInfo.bankNo||''" />
                <van-cell title="分行名称" :value="bankInfo.contactLineName||''" />
                <van-cell title="开户行行号" :value="bankInfo.contactLine||''" />
            </van-cell-group>
        </div>
    </van-popup>
</template>

<script>

export default {

    data() {
        return {
            showPop: false,
            bankInfo: {}
        }
    },

    methods: {
        show(code) {
            this.showPop = true
            this.prepareData(code);
        },

        prepareData(code) {
            console.log("")
            this.$http.bankDetail(code).then(respData => {
                if (respData === false) {
                    return respData;
                }
                this.bankInfo = respData;
            })
        },
    }
}
</script>

<style lang="scss" scoped>
@import "@/assets/color.scss";

.con {
    width: 100vw;
    min-height: 100vh;
    overflow: hidden;
    background-color: #f7f8fa;
    padding-bottom: 100px;
}
</style>